#include "head.h"

// 获取当前时间的函数
// 参数1，需要放时间的字符串
int get_time(char *now_time){
    time_t now;
    time(&now);
    sprintf(now_time, "%s", ctime(&now));
    int i = 0;
    while(now_time[i]){
        if(now_time[i] == '\n'){
            now_time[i] = '\0';
            break;
        }
        i++;
    }
    return 0;

}
